<template>
  <div id="app">
    <p>{{$store.state.age}}</p>
    <p>{{$store.getters.getAge}} +++</p>
    <button @click="$store.commit('a/c/changeAge', 44)">同步修改</button>
    <button @click="$store.dispatch('changeAge', 123)">异步修改</button>

    <p>{{$store.state.a.aAge}}</p>
    <p>{{$store.state.b.bAge}}</p>
    <p>{{$store.state.a.c.cAge}} ----</p>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  mounted() {
    console.log(this.$store, 55)
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
